#pragma semicolon 1

#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <WeaponAPI>

public Plugin:myinfo=
{
	name="Weapon Interface Example",
	author="Skydive",
	description="Changes Many Weapons!",
	version="1.0",
	url=""
};


new WeaponUMP;
new WeaponP90;

new WeaponTMP;

new WeaponScout;
new WeaponAWP;

public OnPluginStart()
{
	WeaponUMP = WX_RegisterWeapon("weapon_ump45","UMP-->P90 BURN");
	WX_SetWeaponViewModel(WeaponUMP,"models/Weapons/v_smg_p90.mdl");
	WX_SetWeaponWorldModel(WeaponUMP,"models/Weapons/w_smg_p90.mdl");
	
	WeaponP90 = WX_RegisterWeapon("weapon_p90","P90-->UMP");
	WX_SetWeaponViewModel(WeaponP90,"models/Weapons/v_smg_ump45.mdl");
	WX_SetWeaponWorldModel(WeaponP90,"models/Weapons/w_smg_ump45.mdl");
	
	WeaponTMP = WX_RegisterWeapon("weapon_tmp","TMP-->MAC10");
	WX_SetWeaponViewModel(WeaponTMP,"models/Weapons/v_smg_mac10.mdl");
	WX_SetWeaponWorldModel(WeaponTMP,"models/Weapons/w_smg_mac10.mdl");
	
	WeaponScout = WX_RegisterWeapon("weapon_scout","Scout-->AWP");
	WX_SetWeaponViewModel(WeaponScout,"models/Weapons/v_snip_awp.mdl");
	WX_SetWeaponWorldModel(WeaponScout,"models/Weapons/w_snip_awp.mdl");
	
	WeaponAWP = WX_RegisterWeapon("weapon_awp","AWP-->Scout");
	WX_SetWeaponViewModel(WeaponAWP,"models/Weapons/v_snip_scout.mdl");
	WX_SetWeaponWorldModel(WeaponAWP,"models/Weapons/w_snip_scout.mdl");
	
	StartWeaponForwards();
}

public WXF_OnWeaponGiven(Client, WeaponID)
{
	PrintToServer("SWITCHED TO %i",WeaponID);
}

public WXF_OnWeaponRemoved(Client, WeaponID)
{
	PrintToServer("BACK FROM %i",WeaponID);
}

public WXF_OnWeaponFired(Client, WeaponID)
{
	PrintToServer("ON WEAPON FIRED %i",WeaponID);
}

public WXF_OnWeaponDamaged(Client,WeaponID,Victim)
{
	if(WeaponID == WeaponUMP)
	{
		IgniteEntity(Victim, 6.0);
	}
	PrintToServer("ON WEAPON DAMAGED %i",WeaponID);
}

public WXF_OnWeaponKilled(Client,WeaponID,Victim)
{
	PrintToServer("ON WEAPON KILLED %i",WeaponID);
}